-- GENERATED SPELL FOR [Illidari Mind Breaker] --


function spell0_22074(pUnit, Event) --@Focused Bursts,n/a--
pUnit:FullCastSpellOnTarget(38985,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22074', 12000, 1)
end

function spell1_22074(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(17194,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22074', 1500, 1)
end

function spell2_22074(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(22884,pUnit)
pUnit:RegisterEvent('Sorts_22074', 4343, 1)
end

function Sorts_22074(pUnit, Event)
local choix_sorts_22074 = math.random(0, 2)
if choix_sorts_22074 == 0 then
pUnit:RegisterEvent('spell0_22074', 1, 1)
end
if choix_sorts_22074 == 1 then
pUnit:RegisterEvent('spell1_22074', 1, 1)
end
if choix_sorts_22074 == 2 then
pUnit:RegisterEvent('spell2_22074', 1, 1)
end
end

function mob22074_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22074', math.random(1500, 3000), 1)
end

function mob22074_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22074_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22074_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22074, 1, 'mob22074_Action')
RegisterUnitEvent(22074, 2, 'mob22074_Leave')
RegisterUnitEvent(22074, 3, 'mob22074_Kill')
RegisterUnitEvent(22074, 4, 'mob22074_Die')
